perf(onpair): adopt onpair 0.2 storage-backed dictionary and safety-only validation - #9117
Conversation
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
develop added benchmarks/string-bench (#9060), which uses vortex_onpair::DEFAULT_DICT12_CONFIG. This branch removes that constant in favour of re-exporting upstream onpair's DEFAULT_CONFIG, which holds the same values (dict-12, threshold 0.15, seed 42), so string-bench is updated to the new name. No textual conflicts. Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com>
Merging this PR will regress 2 benchmarks
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
| }) | ||
| }; | ||
| // A benign race can only ever install another structurally safe value. | ||
| drop(self.dictionary.set(dictionary)); |
Polar Signals Profiling ResultsLatest Run
Previous Runs (7)
Powered by Polar Signals Cloud |
Benchmarks: String Encoding 📖vortex / vortex-file-compressed / ms (0.978x ➖, 1↑ 0↓)
vortex / vortex-file-compressed / % (1.000x ➖, 0↑ 0↓)
|
Benchmarks: PolarSignals Profiling 📖Vortex (geomean): 0.991x ➖ datafusion / vortex-file-compressed / ns (0.991x ➖, 0↑ 0↓)
No file size changes detected. |
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Francesco Gargiulo <gargiulo.fr@gmail.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Benchmarks: Clickbench Sorted on NVME 📖Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.019x ➖, 0↑ 1↓)
datafusion / parquet / ns (1.008x ➖, 2↑ 1↓)
duckdb / vortex-file-compressed / ns (0.998x ➖, 1↑ 1↓)
duckdb / parquet / ns (0.971x ➖, 0↑ 0↓)
File Size Changes (201 files changed, -42.8% overall, 44↑ 157↓)
Totals:
|
Benchmarks: Statistical and Population Genetics 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
duckdb / vortex-file-compressed / ns (0.922x ➖, 3↑ 1↓)
duckdb / parquet / ns (1.005x ➖, 0↑ 0↓)
File Size Changes (2 files changed, -32.3% overall, 0↑ 2↓)
Totals:
|
Benchmarks: TPC-H SF=1 on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.997x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.987x ➖, 2↑ 0↓)
duckdb / vortex-file-compressed / ns (0.982x ➖, 1↑ 0↓)
duckdb / parquet / ns (0.998x ➖, 0↑ 0↓)
File Size Changes (9 files changed, -43.9% overall, 0↑ 9↓)
Totals:
|
Benchmarks: Clickbench on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.009x ➖, 0↑ 2↓)
datafusion / parquet / ns (0.992x ➖, 1↑ 1↓)
duckdb / vortex-file-compressed / ns (0.997x ➖, 2↑ 3↓)
duckdb / parquet / ns (1.014x ➖, 0↑ 3↓)
File Size Changes (101 files changed, -39.2% overall, 0↑ 101↓)
Totals:
|
Benchmarks: FineWeb NVMe 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.970x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.997x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.060x ➖, 0↑ 3↓)
duckdb / parquet / ns (1.014x ➖, 0↑ 0↓)
File Size Changes (2 files changed, -46.3% overall, 0↑ 2↓)
Totals:
|
Benchmarks: TPC-DS SF=1 on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.999x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.997x ➖, 0↑ 2↓)
duckdb / vortex-file-compressed / ns (0.988x ➖, 6↑ 4↓)
duckdb / parquet / ns (1.002x ➖, 4↑ 6↓)
File Size Changes (25 files changed, -43.5% overall, 0↑ 25↓)
Totals:
|
Benchmarks: TPC-H SF=10 on NVME 📖Verdict: No clear signal (low confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.992x ➖, 0↑ 0↓)
datafusion / parquet / ns (0.997x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.001x ➖, 0↑ 0↓)
duckdb / parquet / ns (1.010x ➖, 1↑ 1↓)
File Size Changes (9 files changed, -44.0% overall, 0↑ 9↓)
Totals:
|
Benchmarks: FineWeb S3 📖Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (0.799x ➖, 3↑ 1↓)
datafusion / parquet / ns (1.017x ➖, 1↑ 0↓)
duckdb / vortex-file-compressed / ns (1.199x ➖, 0↑ 1↓)
duckdb / parquet / ns (0.907x ➖, 1↑ 1↓)
|
Benchmarks: TPC-H SF=1 on S3 📖Verdict: No clear signal (environment too noisy confidence) How to read Verdict and Engines
datafusion / vortex-file-compressed / ns (1.092x ➖, 0↑ 3↓)
datafusion / parquet / ns (1.033x ➖, 0↑ 0↓)
duckdb / vortex-file-compressed / ns (1.160x ➖, 0↑ 2↓)
duckdb / parquet / ns (1.046x ➖, 0↑ 0↓)
|
Rationale for this change
onpair0.2 allows to build aCompactDictionaryover caller-owned buffers, andvalidate_safety, which checks only the safety invariants rather than full semantic well-formedness. Adopting both makes OnPair file reads 1.25x faster.What changes are included in this PR?
onpair0.1.1 → 0.2.0.OnPairDatamemoizes aCompactDictionary<OnPairDictionaryStorage>over the existing Vortexbuffers (no copying), and validates it with
validate_safety.OnPair::try_new_with_dataletsOnPairScheme::compresscarry that cache through thechild-compression rebuild instead of discarding it.
DEFAULT_DICT12_CONFIGwith the re-exportedonpair::DEFAULT_CONFIG(identical values), and drops the redundant
OnPairData::len.string-benchvortexsuite, median of 3 interleaved runs, FSST as an untouched control:read(ms)clickbench/URL/shard-0onpair-12tpch/l_commentonpair-12clickbench/URL/shard-0fssttpch/l_commentfsstEncoded size is byte-identical; write times are unchanged.
What APIs are changed? Are there any user-facing changes?
None. The on-disk format is unchanged (golden tests pass unmodified), and
vortex-onpairis gatedbehind
unstable_encodingswithvortex-btrblocksas its only in-tree consumer. Within thatcrate,
OnPairData::newloses itslenparameter,OnPairData::len/is_emptyare removed, andOnPair::try_new_with_datais new.